package cate.game.res.drop;

import cate.common.table.res.drop.row.DropRow;
import cate.game.GameBody;
import cate.game.res.MixRes;

public class DropConfigHelper {
    private DropConfigHelper() {}

    public static MixRes getDropReward(GameBody game, int dropId) {
        return getDropReward(game.table.drop.config.get(dropId));
    }

    public static MixRes getDropReward(DropRow dropRow) {
        if (dropRow == null) {
            return new MixRes();
        }
        DropConfig config = new DropConfig();
        config.parse(dropRow.confCode, dropRow.drowNum);
        return config.buildResList();
    }
}
